// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_CUSTOMER_ACCOUNT
// * CreateDate    : 2012/2/2 10:17:12
// * Creater       : CodeSmith
// * LastChangeDate: 2012/2/2 10:17:12
// * LastChanger   : 2012/2/2 10:17:12
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class FinCustomerAccountEntity : EntityBase
    {
        public FinCustomerAccountTable TableSchema
        {
            get
            {
                return FinCustomerAccountTable.Current;
            }
		}
		
		public FinCustomerAccountEntity()
        {

        }
		
		public FinCustomerAccountEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.CustomerAccountId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ACCOUNT_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.SalesOrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_ORDER_AMOUNT"]));
			this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
			this.ReceivedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVED_AMOUNT"]));
			this.ReceivableAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVABLE_AMOUNT"]));
			this.DeliveryAmountNoBilling = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_NO_BILLING"]));
			this.DeliveryAmountBilled = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_BILLED"]));
			this.SalesAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_AMOUNT"]));
        }
		
		public FinCustomerAccountEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.CustomerAccountId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ACCOUNT_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.SalesOrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_ORDER_AMOUNT"]));
			this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
			this.ReceivedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVED_AMOUNT"]));
			this.ReceivableAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVABLE_AMOUNT"]));
			this.DeliveryAmountNoBilling = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_NO_BILLING"]));
			this.DeliveryAmountBilled = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_BILLED"]));
			this.SalesAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_AMOUNT"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinCustomerAccountTable.Current;
            }
        }
		
		#region Perporty List
        public string CustomerAccountId
        {
            get { return Convert.ToString(GetData(FinCustomerAccountTable.C_CUSTOMER_ACCOUNT_ID)); }
            set { SetData(FinCustomerAccountTable.C_CUSTOMER_ACCOUNT_ID, value); }
        }
		
        public string CustomerId
        {
            get { return Convert.ToString(GetData(FinCustomerAccountTable.C_CUSTOMER_ID)); }
            set { SetData(FinCustomerAccountTable.C_CUSTOMER_ID, value); }
        }
		
        public decimal SalesOrderAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountTable.C_SALES_ORDER_AMOUNT)); }
            set { SetData(FinCustomerAccountTable.C_SALES_ORDER_AMOUNT, value); }
        }
		
        public decimal BillingAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountTable.C_BILLING_AMOUNT)); }
            set { SetData(FinCustomerAccountTable.C_BILLING_AMOUNT, value); }
        }
		
        public decimal ReceivedAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountTable.C_RECEIVED_AMOUNT)); }
            set { SetData(FinCustomerAccountTable.C_RECEIVED_AMOUNT, value); }
        }
		
        public decimal ReceivableAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountTable.C_RECEIVABLE_AMOUNT)); }
            set { SetData(FinCustomerAccountTable.C_RECEIVABLE_AMOUNT, value); }
        }
		
        public decimal DeliveryAmountNoBilling
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountTable.C_DELIVERY_AMOUNT_NO_BILLING)); }
            set { SetData(FinCustomerAccountTable.C_DELIVERY_AMOUNT_NO_BILLING, value); }
        }
		
        public decimal DeliveryAmountBilled
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountTable.C_DELIVERY_AMOUNT_BILLED)); }
            set { SetData(FinCustomerAccountTable.C_DELIVERY_AMOUNT_BILLED, value); }
        }
		
        public decimal SalesAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountTable.C_SALES_AMOUNT)); }
            set { SetData(FinCustomerAccountTable.C_SALES_AMOUNT, value); }
        }
		
		#endregion
	}
	
	
}	

